home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / make / icmake-6.000 / icmake-6 / icmake / exec / pop.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-08  |  510 b   |  25 lines

  1. /*
  2. \funcref{pop}{VAR\_ pop ()}
  3.     {}
  4.     {popped variable}
  5.     {error()}
  6.     {push()}
  7.     {pop.c}
  8.     {
  9.         This function pops a variable off the stack. When the stack index {\em
  10.         sp} is --1 before the pop operation, the stack is empty and an error
  11.         occurs.
  12.  
  13.         See function {\em push()} for a description of the stack.
  14.     }
  15. */
  16.  
  17. #include "icm-exec.h"
  18.  
  19. VAR_ pop ()
  20. {
  21.     if ((INT16)sp == -1)
  22.         error ("stack underflow at %s", hexstring (curoffs, 4));
  23.     return (stack [sp--]);
  24. }
  25.